aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pages/og/[slug].png.ts
diff options
context:
space:
mode:
authorYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-06-26 00:01:26 +0900
committerYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-06-26 00:01:26 +0900
commit4c83f46a50a7a6935062234b19c81426fb1b6f11 (patch)
treea562919ae8d1300777a227bea05a1cfd915b1807 /src/pages/og/[slug].png.ts
parent7bf67d1074e396fbc7190649f1b73f3ea92cdd79 (diff)
OGP画像: フォントサイズを大きく調整
- タイトル: 48px → 52px - 名義(小平市議 安竹洋平): 28px → 36px、ウェイト 600 - ドメイン: 20px → 24px
Diffstat (limited to 'src/pages/og/[slug].png.ts')
-rw-r--r--src/pages/og/[slug].png.ts34
1 files changed, 28 insertions, 6 deletions
diff --git a/src/pages/og/[slug].png.ts b/src/pages/og/[slug].png.ts
index 52b790b..063c22e 100644
--- a/src/pages/og/[slug].png.ts
+++ b/src/pages/og/[slug].png.ts
@@ -66,26 +66,46 @@ export async function GET({ params }: { params: { slug: string } }) {
{
type: "div",
props: {
- style: { display: "flex", flexDirection: "column", gap: "16px", flex: "1" },
+ style: {
+ display: "flex",
+ flexDirection: "column",
+ gap: "16px",
+ flex: "1",
+ },
children: [
{
type: "div",
props: {
- style: { fontSize: "48px", fontWeight: "700", lineHeight: "1.3", letterSpacing: "-0.02em" },
+ style: {
+ fontSize: "52px",
+ fontWeight: "700",
+ lineHeight: "1.2",
+ letterSpacing: "-0.02em",
+ },
children: title,
},
},
{
type: "div",
props: {
- style: { fontSize: "28px", fontWeight: "500", opacity: "0.8", color: "#e0e7ff" },
+ style: {
+ fontSize: "36px",
+ fontWeight: "600",
+ color: "#e0e7ff",
+ },
children: "小平市議 安竹洋平",
},
},
{
type: "div",
props: {
- style: { fontSize: "20px", fontWeight: "400", opacity: "0.5", color: "#e0e7ff", marginTop: "8px" },
+ style: {
+ fontSize: "24px",
+ fontWeight: "400",
+ opacity: "0.6",
+ color: "#e0e7ff",
+ marginTop: "4px",
+ },
children: "yasutakeyohei.com",
},
},
@@ -98,8 +118,10 @@ export async function GET({ params }: { params: { slug: string } }) {
{
width: 1200,
height: 630,
- fonts: [{ name: "sans-serif", data: fontBuffer, weight: 400, style: "normal" }],
- }
+ fonts: [
+ { name: "sans-serif", data: fontBuffer, weight: 400, style: "normal" },
+ ],
+ },
);
const resvg = new Resvg(svg, { fitTo: { mode: "width", value: 1200 } });